import BaseComponent from "../../app/baseComponent";
import { createSubpageComponent } from "../page.component";
import "./progress";

class UiExampleProgress extends BaseComponent {
    constructor(name) {
        super(name);
    }
    _template() {
        var self = this;
        return `<div class="${self._name}">      
    <aui-progress ref="progress" value="75"></aui-progress>
</div>`;
    }
    _mounted() {
        var self = this;        
        setTimeout(function () {
            if (self.$refs.progress) {
                self.$refs.progress.value = 30;
            }
        }, 1000);
    }
    _data() {
        var ret = {};
        return ret;
    }
}

window.AUICustomComponents.define("ui-example-progress", UiExampleProgress);

export default createSubpageComponent(
    `<ui-example-progress></ui-example-progress>`
);